/*
* $Id: ViewFieldValuesHelper.h 157 2010-09-29 19:15:28Z volok-aleksej@yandex.ru $
*
* Copyright 2009 by Volokitin Alexey
* All rights reserved
*
*/
#ifndef _VIEW_FIELD_VALUES_HELPER_H_
#define _VIEW_FIELD_VALUES_HELPER_H_

#include "Visual/Drawers/EditorDrawer/EditorStructs.h"

class CTableCelRow;
struct tableHeader;
interface IDrawer;

class CViewFieldValuesHelper
{
	IDatabase* m_db;
	IDrawer* m_pDrawer;
	std::vector<tableHeader*> m_aUserHeaders;
protected:
	editItem::typeEdit GetTypeEdit(TypeField::type nType);
public:
	CViewFieldValuesHelper(IDrawer* pDrawer);
	~CViewFieldValuesHelper();
public:
	void GenerateUserHeaders(TypeField::table tp, int nBeginId);
	void GenerateUserCels(CTableCelRow* pCelRow, int nIdRecord);
public:
	int GenerateUserEditItems(TypeField::table tp, int nBeginId, int nIdRecord, std::map<int, std::tstring>& aCurValues);
};

#endif/*_VIEW_FIELD_VALUES_HELPER_H_*/